package com.example.sihookuiklydemo.utils

import com.example.sihookuiklydemo.base.BasePager
import com.example.sihookuiklydemo.base.BridgeModule
import com.example.sihookuiklydemo.base.NotifyName.Companion.DESK_MODE_LIST
import com.example.sihookuiklydemo.net.Api.Companion.baseUrl
import com.tencent.kuikly.core.base.IPagerId
import com.tencent.kuikly.core.coroutines.GlobalScope
import com.tencent.kuikly.core.coroutines.launch
import com.tencent.kuikly.core.log.KLog
import com.tencent.kuikly.core.manager.PagerManager
import com.tencent.kuikly.core.module.NetworkModule
import com.tencent.kuikly.core.module.SharedPreferencesModule
import com.tencent.kuikly.core.nvi.serialization.json.JSONObject
import com.tencent.kuikly.core.pager.Pager


class LanguageUtils {
}

fun IPagerId.getLanguage(key: String, defaultValue: String): String {
    return (getPager() as BasePager).getLanguage(key, defaultValue)
}

fun IPagerId.getCancelText(): String {
    return getLanguage("common_cancel", "取消")
}

fun IPagerId.getConfirmText(): String {
    return getLanguage("common_confirm", "确定")
}

fun IPagerId.getNetErrorText(): String {
    return getLanguage("common_net_error_tips", "网络不给力,请检查网络设置")
}